package com.xinqi.common.third.umeng;

import com.alibaba.ocean.rawsdk.ApiExecutor;
import com.umeng.apptrack.param.UmengApptrackAppDownload;
import com.xinqi.common.third.umeng.help.UmengHelp;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 友盟配置
 *
 * @author linkai
 * @date 2023/5/2
 */
@Configuration
@ConditionalOnProperty(prefix = "third.umeng", name = {"apiKey"})
@ConditionalOnClass({ApiExecutor.class, UmengApptrackAppDownload.class})
@EnableConfigurationProperties(value = UmengProperties.class)
public class UmengConfig {
    @Bean
    public UmengHelp smsHelp(UmengProperties umengProperties) {
        return new UmengHelp(umengProperties);
    }
}
